package com.ruoyi.crm.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.crm.mapper.CrmOrderPayDetailsMapper;
import com.ruoyi.crm.domain.CrmOrderPayDetails;
import com.ruoyi.crm.service.ICrmOrderPayDetailsService;

/**
 * 付款计划详情Service业务层处理
 *
 * @author ruoyi
 * @date 2024-11-27
 */
@Service
public class CrmOrderPayDetailsServiceImpl extends ServiceImpl<CrmOrderPayDetailsMapper, CrmOrderPayDetails> implements ICrmOrderPayDetailsService
{
    @Autowired
    private CrmOrderPayDetailsMapper crmOrderPayDetailsMapper;

    /**
     * 查询付款计划详情
     *
     * @param payDetailsId 付款计划详情主键
     * @return 付款计划详情
     */
    @Override
    public CrmOrderPayDetails selectCrmOrderPayDetailsByPayDetailsId(String payDetailsId)
    {
        return crmOrderPayDetailsMapper.selectCrmOrderPayDetailsByPayDetailsId(payDetailsId);
    }

    /**
     * 查询付款计划详情列表
     *
     * @param crmOrderPayDetails 付款计划详情
     * @return 付款计划详情
     */
    @Override
    public List<CrmOrderPayDetails> selectCrmOrderPayDetailsList(CrmOrderPayDetails crmOrderPayDetails)
    {
        return crmOrderPayDetailsMapper.selectCrmOrderPayDetailsList(crmOrderPayDetails);
    }

    /**
     * 新增付款计划详情
     *
     * @param crmOrderPayDetails 付款计划详情
     * @return 结果
     */
    @Override
    public int insertCrmOrderPayDetails(CrmOrderPayDetails crmOrderPayDetails)
    {
        return crmOrderPayDetailsMapper.insertCrmOrderPayDetails(crmOrderPayDetails);
    }

    /**
     * 修改付款计划详情
     *
     * @param crmOrderPayDetails 付款计划详情
     * @return 结果
     */
    @Override
    public int updateCrmOrderPayDetails(CrmOrderPayDetails crmOrderPayDetails)
    {
        return crmOrderPayDetailsMapper.updateCrmOrderPayDetails(crmOrderPayDetails);
    }

    /**
     * 批量删除付款计划详情
     *
     * @param payDetailsIds 需要删除的付款计划详情主键
     * @return 结果
     */
    @Override
    public int deleteCrmOrderPayDetailsByPayDetailsIds(String[] payDetailsIds)
    {
        return crmOrderPayDetailsMapper.deleteCrmOrderPayDetailsByPayDetailsIds(payDetailsIds);
    }

    /**
     * 删除付款计划详情信息
     *
     * @param payDetailsId 付款计划详情主键
     * @return 结果
     */
    @Override
    public int deleteCrmOrderPayDetailsByPayDetailsId(String payDetailsId)
    {
        return crmOrderPayDetailsMapper.deleteCrmOrderPayDetailsByPayDetailsId(payDetailsId);
    }
}
